Carbon


SetFrontProcess

Header: Processes.h Carbon status: Supported

Sets the front process.

OSErr SetFrontProcess (
    const ProcessSerialNumber *PSN
);
PSN

A pointer to the process serial number of the process you want to move to the foreground. This number should be a valid process serial number returned from LaunchApplication, GetNextProcess, GetFrontProcess, GetCurrentProcess, or a high-level event. You can also use the constant kCurrentProcess to refer to the current process.

function result

A result code.

DISCUSSION

The SetFrontProcess function schedules the specified process to move to the foreground. The specified process moves to the foreground after the current foreground process makes a subsequent call to WaitNextEvent or EventAvail.

If the specified process serial number is invalid or if the specified process is a background-only application, SetFrontProcess returns a nonzero result code and does not change the current foreground process.

If a modal dialog box is the frontmost window, the specified process remains in the background until the user dismisses the modal dialog box.

SPECIAL CONSIDERATIONS

Do not call SetFrontProcess at interrupt time.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)